package com.nopcomm.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.Select;

import com.nopcomm.abstractPage;
import com.nopcomm.abstractTest;

public class DashboardPage extends abstractPage {

	public void gotoconsumer() {
		// Click on Administration
		driver.findElement(By.linkText("Administration")).click();
		//click on customers
		driver.navigate().to("http://sangajala-001-site1.smarterasp.net/Admin/Customer/List");
	}
	public static void gotoAdminlogin(String adminEmail, String adminPassword) {
		//click on login link
				driver.findElement(By.linkText("Log in")).click();
				//type Email
				driver.findElement(By.id("Email")).sendKeys(adminEmail);
				//Type Password
				driver.findElement(By.id("Password")).sendKeys(adminPassword);
				//Click to Login
				driver.findElement(By.className("button-1 login-button")).click();
				
				
		
		
	}
	
	public static boolean isSuccessmessage() {
		// 
		
		return  driver.getPageSource().contains("The new customer has been added successfully.");
				
	}
	public void gotoCategory() {
		// Click on Administration
		driver.findElement(By.linkText("Administration")).click();
		//click on Category
		driver.navigate().to("http://sangajala-001-site1.smarterasp.net/Admin/Category/List");
	}
	
	
	
	}


